load("@rules_cc//cc:cc_library.bzl", "cc_library")
load("@rules_zig//zig:defs.bzl", "zig_library")

cc_library(
    name = "macos_c",
    srcs = ["macos.c"],
    hdrs = ["macos.h"],
    target_compatible_with = [
        "@platforms//os:macos",
    ],
    visibility = ["//zml/tools:__subpackages__"],
)

zig_library(
    name = "tools",
    srcs = ["tracer.zig"],
    main = "tools.zig",
    visibility = ["//visibility:public"],
    deps = select({
        # TODO(cerisier): fix MacOsTracer
        # "@platforms//os:macos": [ ":macos_c" ],
        "//conditions:default": [],
    }),
)

cc_static_library(
    name = "macos_static_tools",
    deps = ["macos_c"],
)
